package com.guigu.tms.commons.aggregation.feign;


import com.guigu.tms.commons.aggregation.entity.TransportTrips;
import com.guigu.tms.commons.aggregation.entity.TransportTripsTruckDriver;
import com.guigu.tms.commons.aggregation.entity.Truck;
import com.guigu.tms.commons.aggregation.entity.TruckDriver;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(value = "tms-aggregation",path = "/aggregation/transportTrips",contextId = "transportTrips")
public interface TransportTripsFeignClient {
    @GetMapping("getTransportTrips")
    List<TransportTrips> getTransportTrips(@RequestParam String id);

    @PostMapping("getTripsTruckDriver")
    List<TransportTripsTruckDriver> getTripsTruckDriver(@RequestBody List<String> ids);

    @PostMapping("getTruckByIds")
    List<Truck> getTruckByIds(@RequestBody List<String> ids);

    @PostMapping("getTruckDriverByIds")
    List<TruckDriver> getTruckDriverByIds(@RequestBody List<String> ids);

    @PostMapping("getTransportTripsByIds")
    List<TransportTrips> getTransportTripsByIds(@RequestBody List<String> ids);

    @GetMapping("getTransportTripsById")
    TransportTrips getTransportTripsById(@RequestParam String id);
}
